﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="query.aspx.cs" Inherits="AnyOffice.general.work_plan.show.query" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>项目进度查询</title>
		
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
		<link rel="stylesheet" type="text/css" href="/module/date_selector/popcalendar.css">
		<script src="/module/date_selector/popcalendar.js"></script>
		<script src="/aspnet_client/core/function.js"></script>
		<script Language="JavaScript">		
		function CheckForm()
		{
			if(!checkIsDate(document.Form1.txtBeginDate.value))
			{
				alert("开始日期不正确！");
				document.Form1.txtBeginDate.focus();
				return (false);
			}
			   
			if(!checkIsDate(document.Form1.txtEndDate.value))
			{
				alert("结束日期不正确！");
				document.Form1.txtEndDate.focus();
				return (false);
			}			
			return true;
		}
		                   
		function open_workplan(plan_id)
		{
//			URL="../read_workplan.aspx?plan_id="+plan_id;
//			myleft=(screen.availWidth-500)/2;
//			window.open(URL,"read_notify","height=400,width=550,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=150,left="+myleft+",resizable=yes");

			var mwidth = "600";
			var mheight = "450";
			var loc_x = parseInt((window.screen.width - mwidth) / 2);
			var loc_y = parseInt((window.screen.height - mwidth) / 2);

			var _oParameter = new Object();
			_oParameter.dialogTitle = "项目管理";
			_oParameter.openFile = "../read_workplan.aspx?plan_id=" + plan_id + "&num=" + Math.random();

			window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
  
     
        
        
        }
		</script>
	</HEAD>
	<body class="bodycolor" style="padding-top:0;" topMargin="5">
  
		<form id="Form1" method="post" runat="server">
          <div class="main_div">
			<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
				<tr>
					<td class="tab_ti">
					  所有项目查询 
					</td>
				</tr>
			</table>
			<asp:Panel id="pnlMain" runat="server">
				<TABLE class="tab_pub" cellSpacing="0" cellPadding="2" width="500" align="center" border="0">
					<TR>
						<TD class="ta_bg" noWrap>项目名称：</TD>
						<TD class="ta_txt"><INPUT class="BigInput" id="txtName" type="text" maxLength="200" size="36" name="txtName"
								runat="server">
						</TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>项目内容：</TD>
						<TD class="ta_txt"><INPUT class="BigInput" id="txtContent" type="text" maxLength="200" size="36" name="txtContent"
								runat="server">
						</TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>日期范围：</TD>
						<TD class="ta_txt">
						<INPUT class="BigInput" id="txtBeginDate" onDblClick="document.Form1.txtBeginDate.value='';"
								type="text" maxLength="10" size="12" name="txtBeginDate" runat="server"> <IMG style="CURSOR: hand" onClick="popUpCalendar(this,txtBeginDate,'yyyy-mm-dd','');"
								src="/module/date_selector/calendar.gif" align="absMiddle" border="0">
							至 <INPUT class="BigInput" id="txtEndDate" onDblClick="document.Form1.txtEndDate.value='';"
								type="text" maxLength="10" size="12" name="txtEndDate" runat="server"> <IMG style="CURSOR: hand" onClick="popUpCalendar(this,txtEndDate,'yyyy-mm-dd','');" src="/module/date_selector/calendar.gif"
								align="absMiddle" border="0">
						</TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>进度类型：</TD>
						<TD class="ta_txt">
							<asp:DropDownList id="ddlTypeId" runat="server" CssClass="BigSelect"></asp:DropDownList></TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>发布范围（部门）：</TD>
						<TD class="ta_txt"><TEXTAREA class="BigStatic fl" id="ToName" name="ToName" rows="2" readOnly wrap="yes" cols="35"
								runat="server"></TEXTAREA>
								<INPUT class="bnt_Add fl" style="width:46px; display:inline-table;" title="添加部门" onClick="dept_select('ToId','ToName','');" type="button" value="添加"
								name="button">
								<INPUT class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空部门" onClick="clear_double('ToId','ToName');" type="button" value="清空"
								name="button"><INPUT id="ToId" type="hidden" name="ToId" runat="server">
						</TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>参与人：</TD>
						<TD class="ta_txt"><INPUT class="BigStatic fl" id="ParticipatorName" readOnly maxLength="20" name="ParticipatorName" runat="server"></INPUT>
						<INPUT class="bnt_Add fl" style="width:46px; display:inline-table;" title="添加用户" onClick="user_select('ParticipatorId','ParticipatorName');" type="button" value="添加"
								name="button">
								<INPUT class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空用户" onClick="clear_double('ParticipatorId','ParticipatorName');" type="button" value="清空"
								name="button"><INPUT id="ParticipatorId" type="hidden" name="ParticipatorId" runat="server"></TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>负责人：</TD>
						<TD class="ta_txt"><INPUT class="BigStatic fl" id="ManagerName" readOnly maxLength="20" name="ManagerName" runat="server"></INPUT>
						<INPUT class="bnt_Add fl" style="width:46px; display:inline-table;" title="添加用户" onClick="user_select('ManagerId','ManagerName');" type="button" value="添加"
								name="button">
								<INPUT class="bnt_Del fl" style="width:46px; display:inline-table;" title="清空用户" onClick="clear_double('ManagerId','ManagerName');" type="button" value="清空"
								name="button"><INPUT id="ManagerId" type="hidden" name="ManagerId" runat="server"></TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>备注：</TD>
						<TD class="ta_txt"><INPUT class="BigInput" id="txtRemark" type="text" maxLength="200" size="40" name="txtRemark"
								runat="server">
						</TD>
					</TR>
					<TR align="center">
						<TD noWrap colSpan="2" class="bnt_con">
							<INPUT class="BigButton" onClick="return CheckForm();" type="submit" value="查询">
							<%--<INPUT class="BigButton" onclick="location='work_plan.aspx?date=1';" type="button" value="返回">--%>
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Panel id="pnlLater" runat="server" Visible="False">
				<asp:Repeater id="rptWorkPlan" runat="server">
				<HeaderTemplate>
			<br>
			<table border="0" cellspacing="0" width="100%" class="tab_pub" cellpadding="0">
			<tr>
					<td nowrap class="TableHeader" align="center">项目名称</td>
					<td nowrap class="TableHeader" align="center">开始日期</td>
					<td nowrap class="TableHeader" align="center">预计完成日期</td>
					<td nowrap class="TableHeader" align="center">项目类别</td>
					<td nowrap class="TableHeader" align="center">发布范围</td>
					<td nowrap class="TableHeader" align="center">负责人</td>
					<td nowrap class="TableHeader" align="center">状态</td>
				</tr>
			</HeaderTemplate>
			<ItemTemplate>
			<tr class="TableLine1">
					<td><a href="javascript:open_workplan('<%#Eval("PlanId")%>');"><%#Eval("Name")%></a></td>
					<td nowrap align="center"><%# Eval("BeginDate") != DBNull.Value ? Convert.ToDateTime(Eval("BeginDate")).ToString("yyyy-MM-dd"):""%></td>
					<td nowrap align="center"><%# Eval("EndDate") != DBNull.Value ? Convert.ToDateTime(Eval("EndDate")).ToString("yyyy-MM-dd"):""%></td>
					<td nowrap align="center"><%#Eval("TypeName")%></td>
					<td><%#Eval("ToName")%></td>
					<td nowrap align="center"><%#Eval("UserName")%></td>
					<td nowrap align="center"><%#GetStatusDesc(Convert.ToInt32(Eval("Status")))%></td>
				</tr>
			</ItemTemplate>
			<AlternatingItemTemplate>
				<tr class="TableLine2">
					<td><a href="javascript:open_workplan('<%#Eval("PlanId")%>');"><%#Eval("Name")%></a></td>
					<td nowrap align="center"><%# Eval("BeginDate") != DBNull.Value ? Convert.ToDateTime(Eval("BeginDate")).ToString("yyyy-MM-dd"):""%></td>
					<td nowrap align="center"><%# Eval("EndDate") != DBNull.Value ? Convert.ToDateTime(Eval("EndDate")).ToString("yyyy-MM-dd"):""%></td>
					<td nowrap align="center"><%#Eval("TypeName")%></td>
					<td><%#Eval("ToName")%></td>
					<td nowrap align="center"><%#Eval("UserName")%></td>
					<td nowrap align="center"><%#GetStatusDesc(Convert.ToInt32(Eval("Status")))%></td>
				</tr>
			</AlternatingItemTemplate>
			<FooterTemplate>
			</table>
			</FooterTemplate>
				</asp:Repeater>
				<asp:Literal id="litMessage" runat="server"></asp:Literal>
				<BR>
				<CENTER><INPUT class="BigButton" onClick="location='query.aspx';" type="button" value="返回"></CENTER>
				<BR>
			</asp:Panel>
         </div>
		</form>
	</body>
</HTML>
